Update functions.md - #77
Conversation
After full change
mmcky
left a comment
There was a problem hiding this comment.
Thank you Emile — this is an excellent review, and apologies for the two-week wait for a reply.
We checked every change against the English and against fresh translations from the current version of the tool. All 15 are improvements or sound editorial choices, and your three must-fixes are confirmed:
- face / pile — the tool still gets the coin side wrong in about half of fresh translations, so your ruling becomes a French glossary entry (Heads → Face). In testing, that took it from 6 of 12 correct to 12 of 12.
- l’[Exercice 1] — you're right about the smartquotes mechanism. The same problem appears in 24 places across 13 chapters, so we'll fix it in the tool's French typography pass and repair the whole edition in one go, rather than asking you to chase them.
This is ready to merge as it is — merging now. Thank you again for the care that went into it.
One question, no rush: in exercises you've consistently kept the imperative (« Écrivez une fonction… », « Réécrivez… »), but in python_by_example you changed « Posez
…, plus two hand-ports Brings the rest of the edition into line with the editor's round-2 rulings (#77, #78, #80), following the #26 pattern: - « espace de noms » -> « espace de nommage » (#80, per the official French Python docs): oop_intro.md:398, scipy.md:88, python_oop.md:262/296. The adjective at oop_intro.md:398 stays « intégré » pending the editor's built-in ruling. - « retourner » -> « renvoyer » for returned values (#80): pandas_panel.md:466/475/479/517/523, polars.md:546. - functions.md:348: the English "standard normals" are draws, so « variables normales centrées réduites », not « lois ». Hand-ports: - numpy.md:1296: `discreteRV` -> `DiscreteRV`, the QuantEcon/lecture-python-programming#604 edit that never arrived (the numpy.md sync fails structural parity until the source's duplicated {index} is removed). - sympy.md: repair the garbled seed anchor `(sympy=` and drop the duplicate `(sympy)=` added before the title, matching the source pre-title. No typography changes (apply.mjs --dry-run: 0/27). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…, plus two hand-ports (#81) * Round-2 consistency pass: namespace and renvoyer rulings edition-wide, plus two hand-ports Brings the rest of the edition into line with the editor's round-2 rulings (#77, #78, #80), following the #26 pattern: - « espace de noms » -> « espace de nommage » (#80, per the official French Python docs): oop_intro.md:398, scipy.md:88, python_oop.md:262/296. The adjective at oop_intro.md:398 stays « intégré » pending the editor's built-in ruling. - « retourner » -> « renvoyer » for returned values (#80): pandas_panel.md:466/475/479/517/523, polars.md:546. - functions.md:348: the English "standard normals" are draws, so « variables normales centrées réduites », not « lois ». Hand-ports: - numpy.md:1296: `discreteRV` -> `DiscreteRV`, the QuantEcon/lecture-python-programming#604 edit that never arrived (the numpy.md sync fails structural parity until the source's duplicated {index} is removed). - sympy.md: repair the garbled seed anchor `(sympy=` and drop the duplicate `(sympy)=` added before the title, matching the source pre-title. No typography changes (apply.mjs --dry-run: 0/27). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * python_oop.md: `__init_` -> `__init__` A one-character typo carried over from the English source (QuantEcon/lecture-python-programming python_oop.md:243, listed in QuantEcon/lecture-python-programming#633). Raised by Copilot review. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he second editor round (#328) * glossary(fr): v1.2 — Namespace, Heads, standard-normal context from the second editor round Encodes the terminology rulings from the French editor's second review round (QuantEcon/lecture-python-programming.fr#77 and #80, merged 2026-09-23) that meet the glossary bar — an explicit native ruling plus measured variation: - Namespace → Espace de nommage. The official French Python docs use « espace de nommage »; fresh init draws at v0.29.2 wrote « espace de noms » 206/206. A NEW section brought « noms » back 3/3 without the pin, 0/3 with it. - Heads (coin toss) → Face. The coin side was wrong in 6/12 fresh draws of the exercise without the pin, 0/12 with it. Tails → Pile is not pinned: no source occurrence, and it would sit beside four « queue » entries. - Standard normal keeps « Loi normale centrée réduite »; its context now steers draws and random variables to « variable normale centrée réduite » (« lois » for draws 8/32 → 0/28; distribution sense 16/16). Held for measurement: Garbage collection, Return (a value). Held for an editor ruling: Built-in function. 367 → 369 terms; docs counts updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs: ml glossary count 61/77 -> 87 (v0.7.0) The ml glossary reached v0.7.0 / 87 terms across #303, #311 and #315, which updated glossary/ml.json but not the docs. Raised by Copilot review on #328. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
For this one, I’d keep the distinction intentional. I think the imperative works better when we’re directly asking the reader to do something, like “Écrivez une fonction…”, “Calculez…” or “Tracez…”. For parameter definitions or mathematical setup, I’d use the impersonal form instead, for example “On pose (T = 200)” or “On suppose que…”. So the change from “Posez (T = 200)” to “On pose (T = 200)” was specific to that kind of setup. I wouldn’t change all exercise instructions to “On écrit…” / “On écrira…”. I’d keep the imperative for actual instructions and use “On…” for setup or assumptions. |
Review of the French translation of the Functions chapter (
functions.md)Must-fix
1. Exercise 3, line 571 – coin side
"heads" was rendered as "une face (pile)". In French, face and pile are the two opposite sides of a coin, so writing them together is contradictory. "Heads" is the side bearing the effigy, which is face; "tails" is pile.
Sources: Monnaie royale canadienne, Anatomie d'une pièce (https://www.mint.ca/fr/commencez-votre-collection/anatomie-dune-piece-de-monnaie).
1. Si une face (pile) apparaîtkfois ou plus consécutivement dans cette séquence au moins une fois, payez un dollar.1. Si le côté « face » apparaîtkfois ou plus consécutivement dans cette séquence au moins une fois, payez un dollar.2. Exercise 3, line 576 – same coin side error in the second rule
Si une face (pile) apparaîtkfois ou plus dans cette séquence, payez un dollar.Si le côté « face » apparaîtkfois ou plus dans cette séquence, payez un dollar.3. Exercise 5, line 688 – apostrophe rendered as a closing quote
A straight apostrophe followed by
[is converted by Sphinx smartquotes into”, so the site displays "l”Exercice 1". Replaced with a typographic apostrophe in the source.Réécrivez la fonctionfactorial()de l'[Exercice 1](factorial_exercise) en utilisant la récursion.Réécrivez la fonctionfactorial()de l’[Exercice 1](factorial_exercise) en utilisant la récursion.4. Lambda section, line 273 – missing comma before the main clause
Pour créer la fonction $f(x) = x^3$ nous pouvons utiliserlambdacomme suitPour créer la fonction $f(x) = x^3$, nous pouvons utiliserlambdacomme suitTerminology and style
5. Adding conditions, line 405 – alias is the usual programming term
* Pendant l'exécution de ces lignes, les nomsgenerator_typeetrng.uniformsont des « synonymes », et peuvent être utilisés de manière identique.* Pendant l'exécution de ces lignes, les nomsgenerator_typeetrng.uniformsont des « alias », et peuvent être utilisés de manière identique.6. Adding conditions, line 418 – general statement, present tense
Ici, nous avons créé un autre nom pour la fonction intégréemax(), qui pouvaitIci, nous avons créé un autre nom pour la fonction intégréemax(), qui peut7. Recursion, line 437 – math mode consistency with
$x_t$Par exemple, considérons le problème du calcul de $x_t$ pour un certain t lorsquePar exemple, considérons le problème du calcul de $x_t$ pour un certain $t$ lorsque8. Recursion, line 471 – smoother French for LIFO
* une structure de données dernier entré, premier sorti (LIFO)* une structure de données selon le principe « dernier entré, premier sorti » (LIFO)9. Exercise 3, line 568 – expérience aléatoire is the standard term in French probability
D'abord, écrivez une fonction qui renvoie une réalisation du dispositif aléatoire suivantD'abord, écrivez une fonction qui renvoie une réalisation de l'expérience aléatoire suivante10. Exercise 3, line 574 – same as 9
Ensuite, écrivez une autre fonction qui effectue la même tâche sauf que la deuxième règle du dispositif aléatoire ci-dessus devientEnsuite, écrivez une autre fonction qui effectue la même tâche sauf que la deuxième règle de l'expérience aléatoire ci-dessus devient11. Exercise 3 solution, line 587 – same as 9
Voici une fonction pour le premier dispositif aléatoire.Voici une fonction pour la première expérience aléatoire.12. Exercise 3 solution, line 612 – same as 9
Voici une autre fonction pour le deuxième dispositif aléatoire.Voici une autre fonction pour la deuxième expérience aléatoire.13. Exercise 4, line 654 – more natural technical French
Écrivez une fonction pour calculer récursivement le $t$-ième nombre de Fibonacci pour tout $t$.Écrivez une fonction qui calcule récursivement le $t$-ième nombre de Fibonacci pour tout $t$.14. Exercise 4 solution, line 663 – avoids implying a unique solution
Voici la solution standardVoici une solution standard15. Exercise 5 solution, line 697 – same as 14
Voici la solution standardVoici une solution standard